package com.jzo2o.market.controller.operation;

import com.jzo2o.common.model.PageResult;
import com.jzo2o.market.model.dto.request.CouponPageQueryDTO;
import com.jzo2o.market.model.dto.response.CouponPageInfoResDTO;
import com.jzo2o.market.service.ICouponService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 运营端 - 优惠卷管理控制器
 * @author JIAN
 */
@Slf4j
@RestController("operationCouponController")
@RequestMapping("/operation/coupon")
public class CouponController {
    @Resource
    private ICouponService couponService;

    @GetMapping("/page")
    public PageResult<CouponPageInfoResDTO> pageCoupon(CouponPageQueryDTO couponPageQueryDTO) {
        return couponService.page(couponPageQueryDTO);
    }
}